from django.urls import path
from blog import views
urlpatterns = [
    path('register/', views.RegisterView.as_view()),
    path('login/', views.LoginView.as_view()),
    path('code/', views.SendSmsView.as_view()),
    path('account/', views.AddMessageView.as_view()),
    path('password/', views.UpdateUserView.as_view()),
    path('addtag/', views.TagView.as_view()),
    path('searchtag/', views.SearchTagView.as_view()),
    path('updatetag/', views.UpdateTagView.as_view()),
    path('deletetag/', views.DeleteTagView.as_view()),
    path('article/', views.ArticleListView.as_view()),
    path('article/<int:article_id>/', views.ArticleListView.as_view()),
    path('articles/<int:article_id>/', views.ArticleDeleteView.as_view()),
    path('picture/', views.QiNiuYun.as_view(), name='qiniu-token'),
    path('public/articles/', views.ArticlePublishView.as_view(), name='public-articles'),
    path('public/article/<int:article_id>/', views.ArticlePublishView.as_view(), name='public-article-list'),
    path('public/<int:article_id>/comments/', views.ArticleCommentsView.as_view(),)
]
